home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / File / DLL / MakeDLL < prev    next >
Text File  |  1995-07-22  |  3KB  |  143 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.AllocLoad    \
  4.             o.Exists    \
  5.             o.IsDir    \
  6.             o.LoadTo    \
  7.             o.printf    \
  8.             o.SetType    \
  9.             o.Size    \
  10.             o.Date    \
  11.             o.Delete    \
  12.             o.FileOps    \
  13.             o.GetType    \
  14.  
  15.  
  16. LibName        =    File
  17.  
  18.  
  19.  
  20. # Template makefile to make Straylight Dynamic Link 
  21. # Library from a DeskLib sublibrary's .o files
  22. #
  23. # The DLL is made in the directory 
  24. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  25. # and has the same name as the DeskLib sublibrary.
  26. #
  27. # Julian Smith 17 Apr 1995.
  28.  
  29. # The macro $(ObjectFiles) should be set at the 
  30. # start of this file, to be a space-separated
  31. # list of object files.
  32. # This is done by 'Makatic'.
  33.  
  34. # The macro $(LibName) should also be set at the 
  35. # start of this file, to be the name of the 
  36. # DeskLib sublibrary.
  37. # This is done by 'Makatic'.
  38.  
  39. # Note that this makefile doesn't use cc at all
  40. # - it merely links existing .o files.
  41.  
  42. # Linker flags, These can be anything. 
  43. # All flags required by Straylight (eg Link -rmf) 
  44. # are included in the $(LINK) macro.
  45. #
  46. LinkFlags    =    $(LinkExtra)
  47.  
  48.  
  49. # Macros for commands, including the Straylight
  50. # tool 'cdll'. Note that DRLink doesn't seem to
  51. # work with the SDLS.
  52. #
  53. LINK        =    Link -rmf
  54. CDLL        =    cdll
  55.  
  56.  
  57. # Filename of the thing we need to make: - the main
  58. # dynamically-linked library, which will go in the 
  59. # !DLL application.
  60. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  61. # application) should be the same as the 'name' field in the
  62. # $(DLL_Def) file. In this case, this is $(LibName).
  63. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  64.  
  65.  
  66. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  67. #
  68. DLL_Header    =    Header
  69. DLL_Def        =    ^.DLLDef
  70. DLL_Stubs    =    Stubs
  71.  
  72.  
  73.  
  74. # -------------------------------------------------------
  75. # Everything below here should probably not be changed...
  76. # -------------------------------------------------------
  77.  
  78.  
  79. # Extra libs, written by Straylight, which always need to be linked into a DLL
  80. #
  81. SDLS_ExtraObjects=                    \
  82.             C:DLLLib.o.DLLLib        \
  83.             C:DLLLib.o.dstubs        \
  84.  
  85.  
  86. # Extra DeskLib libraries which need to be linked into the final DLL.
  87. # The DLL DeskLib library is included here because some DeskLib DLLs may
  88. # refer to other DeskLib DLLs.
  89. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  90. # the sublibraries for which there is a DLL - just the DLL Stubs file
  91. # is included for these.
  92. #
  93. DeskLib_ExtraObjects=                \
  94.             DeskLib:o.DLLDLL    \
  95.  
  96.  
  97.  
  98.  
  99. #Here's what we want to make...
  100.  
  101. All:    $(DLL_Lib)
  102.  
  103. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  104.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  105.  
  106.  
  107.  
  108. # Here's how to make the things which are needed in the above rules
  109.  
  110. $(DLL_Def):    
  111.     | Error: No DLL definition file exists.
  112.     |        You should run th MkStubsOs makefile
  113.     |        and then alter the template Def
  114.     |        file by hand.
  115.  
  116. $(DLL_Header):    $(DLL_Def)
  117.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  118.  
  119.  
  120. # Rule for compiling C source code for a Straylight dynamically-linked library.
  121. # Actually, we don't call cc - we complain and tell the user to run the 
  122. # MkStubsOs makefile.
  123.  
  124. VPATH = @.^
  125.  
  126. .SUFFIXES:    .o .c .s
  127. .c.o:
  128.     | $@ needs recompiling. This should be done by
  129.     | running the MkStubsOs or MkOs makefile before running
  130.     | this makefile.
  131.     |
  132.  
  133. .s.o:
  134.     | $@ needs assembling. This should be done by
  135.     | running the MkStubsOs or MkOs makefile before running
  136.     | this makefile.
  137.     |
  138.  
  139.  
  140.  
  141. # Dynamic dependencies:
  142.